﻿using System;
using System.Collections.Generic;
using System.Text;

namespace MuXue.Zyiz.Template.Common.Redis
{
    public class RedisKey
    {

        public const string KeyPrefix = "zyiz_slavedbapi_"; // 默认前缀
        //public static readonly string KeyPrefix = AppSettingConfigService.AppSettingConfig.KeyPrefix; // 默认前缀

         
 
            /// <summary>
            /// 已经处理过的符合条件的合同id存入缓存，这样下次就不需要再次处理了
            /// </summary>
            /// <param name="htid"></param>
            /// <param name="htType">1v1合同=1,1v3合同=3，促销合同=9</param>
            /// <returns></returns>
        public static string SucceedHeTongIds(string htid,int htType)
        { 
            return string.Concat(KeyPrefix, $"SucceedHeTongIds_{htType}_{htid}");
        }
        

        /// <summary>
        /// 字典列表
        /// 2019-4-18 李朴 add
        /// </summary>
        /// <param name="parent_code">父类code</param>
        /// <returns></returns>
        public static string DictListKey(string  parent_code)
        {
            return string.Concat(KeyPrefix, "dictlist_", parent_code);
        }

        /// <summary>
        /// 字典详情
        /// 2019-4-18 李朴 add 
        /// </summary>
        /// <param name="dict_code"></param>
        /// <returns></returns>
        public static string DictInfoKey(string dict_code)
        {
            return string.Concat(KeyPrefix, "dictinfo_", dict_code);
        }
 

    }
}
